package com.fs.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.fs.common.base.service.AbstractBaseEntityService;
import com.fs.sys.bean.dto.PhoneMessageDTO;
import com.fs.sys.bean.query.PhoneMessageQuery;
import com.fs.sys.domain.entity.PhoneMessageEntity;
import com.fs.sys.domain.mapper.PhoneMessageMapper;
import com.fs.sys.entityservice.PhoneMessageEntityService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * 短信服务实现 
 * @author Coder Generator 2025-06-19 10:08:24 
 **/
@Service
public class PhoneMessageEntityServiceImpl extends AbstractBaseEntityService<PhoneMessageEntity, PhoneMessageDTO, PhoneMessageMapper, PhoneMessageQuery> implements PhoneMessageEntityService {
    @Override
    protected QueryWrapper<PhoneMessageEntity> queryToWrapper(PhoneMessageQuery query) {
        return this.createQueryWrapper()
                .eq(StringUtils.isNotBlank(query.getId()), "id", query.getId())
                .in(null != query.getIds(), "id", query.getIds())
                .orderByDesc("create_time");
    }
}